﻿using System.ComponentModel.DataAnnotations.Schema;
using Simple.Services.System.QHSEViolationCategory.Models;

/// <summary>
/// 违章岗位
/// </summary>
public class QHSEPositionModel : ModelBase
{
    /// <summary>
    /// ID
    /// </summary>
    [MaxLength(32)]
    public string Id { get; set; }

    /// <summary>
    /// 作业专业编码
    /// </summary>
    [MaxLength(32)]
    public string? SpecialtyCode { get; set; }

    /// <summary>
    /// 岗位编码
    /// </summary>
    [MaxLength(32)]
    public string? PositionCode { get; set; }

    /// <summary>
    /// 岗位描述
    /// </summary>
    [MaxLength(100)]
    public string? Position { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200)]
    public string? Note { get; set; }

    /// <summary>
    /// 排序号
    /// </summary>
    public int? OrderNo { get; set; }

    public override void ConfigureMapper(Profile profile)
    {
        profile.CreateMap<QHSESysPosition, QHSEPositionModel>()
            .ForMember(d => d.Id, options => options.MapFrom(s => s.Id));

        profile.CreateMap<QHSEPositionModel, QHSESysPosition>()
            .ForMember(d => d.Id, options => options.MapFrom(s => s.Id));
    }
}
